home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Filing / s / MakePath < prev    next >
Text File  |  1995-08-26  |  1KB  |  49 lines

  1. ;   ####             #    #     # #
  2. ;   #   #            #    #       #          The FreeWare C library for
  3. ;   #   #  ##   ###  #  # #     # ###             RISC OS machines
  4. ;   #   # #  # #     # #  #     # #  #   ___________________________________
  5. ;   #   # ####  ###  ##   #     # #  #
  6. ;   #   # #        # # #  #     # #  #    Please refer to the accompanying
  7. ;   ####   ### ####  #  # ##### # ###    documentation for conditions of use
  8. ;   ________________________________________________________________________
  9. ;
  10. ;   File:    Filing.s.MakePath
  11. ;   Author:  Copyright © 1994, 1995 Sergio Monesi
  12. ;   Version: 1.01 (6 Jun 1995)
  13. ;   Purpose: Constructs the full pathname from the directory and leafname
  14. ;   Mods:    6 June 1995 - changed procedure name to a more
  15. ;                          DeskLib-compliant style
  16.  
  17.         GET     ^.h.regdefs
  18.         GET     ^.h.macros
  19.  
  20. ; char *Filing_MakePath(char *newpath, char *dirname, char *leafname);
  21.  
  22.         PREAMBLE
  23.         STARTCODE Filing_MakePath
  24. ;
  25.         MOVS    ip, r0
  26.         TEQNE   r1, #0
  27.         TEQNE   r2, #0
  28.         MOVEQ   r0, #0
  29.         MOVEQS  pc, lr
  30.  
  31. loop1
  32.         LDRB    r3, [r1], #1
  33.         TEQ     r3, #0
  34.         STRNEB  r3, [ip], #1
  35.         BNE     loop1
  36.  
  37.         MOV     r3, #46            ; = '.'
  38.         STRB    r3, [ip], #1
  39.  
  40. loop2
  41.         LDRB    r3, [r2], #1
  42.         TEQ     r3, #0
  43.         STRB    r3, [ip], #1
  44.         BNE     loop2
  45.  
  46.         MOVS    pc,lr
  47. ;
  48.         END
  49.